package com.fenshi.until;

/**
 * Created by Administrator on 2015/9/14.
 */
public class MethodCode {
    final public static String responseContent_key = "responseContent";
    final public static String responseStatue = "status";
    final public static String USERID = "userId";
    final public static String SESSION = "sessionId";
    final public static String OBJECT = "obj";

    final public static int PAGE_SIZE = 20;

    public enum NetState{
        ERROR(0),SUCCESS(1);
        int i;
        NetState(int i){
            this.i = i;
        }
        public int getValue(){
            return i;
        }
    }

    public enum CardStatus{
        ERROR(0),SUCCESS(1),INUSE(2),NOTENOUGH(3),LOCKED(4),NOTACCESS(5);
        int i ;
        CardStatus (int i){
            this.i = i;
        }
        public int getValue(){return  i;}
        public static String getText(int i){
            if (i == 1) return "正常";
            else if (i == 2) return "使用中";
            else if (i == 3) return "余额不足";
            else if (i == 4) return "被锁定";
            else if (i == 0) return "异常";
            return "未审核";
        }

    }

    public enum OrderStatus{
        UNACTIVATION(0),INUSE(1),RETURN(2),FINISH(3),DELETE(4),CHECKCAR(5);
        int i ;
        OrderStatus (int i){
            this.i = i;
        }
        public int getValue(){return  i;}
    }

    public enum CarStatus{
        BEUSE(1),INUSE(2),FIXING(3),UNUSE(4);
        int i ;
        CarStatus (int i){
            this.i = i;
        }
        public int getValue(){return  i;}
        public String getText(int i){
            if (i == 1) return "正常";
            else if (i == 2) return "使用中";
            else if (i == 3) return "正在维修";
            else if (i == 4) return "不可使用";
            return "";
        }

    }

    public enum RentCar{
        BEUSE(1),INUSE(2),FIXING(3),UNUSE(4);
        int i ;
        RentCar (int i){
            this.i = i;
        }
        public int getValue(){return  i;}
        public String getText(int i){
            if (i == 1) return "正常";
            else if (i == 2) return "使用中";
            else if (i == 3) return "正在维修";
            else if (i == 4) return "不可使用";
            return "";
        }

    }
}
